<html>
<head><meta charset="utf-8"><title>rust-num contribution guide · general · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/index.html">general</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/rust-num.20contribution.20guide.html">rust-num contribution guide</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="216797308"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/rust-num%20contribution%20guide/near/216797308" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Elichai Turkel <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/rust-num.20contribution.20guide.html#216797308">(Nov 15 2020 at 15:08)</a>:</h4>
<p>Hi <span class="user-mention" data-user-id="138448">@cuviper</span> is there a guideline for rust-num contributions?<br>
I'm thinking of working on optimizations for it, what does this library optimize for? readability? CPU/memory? something else?<br>
I'm assuming it first optimizes for safety, so things like SIMD and assembly impls aren't too welcome, but I'm still sure there's a lot to be done in terms of performance and features and I'd love to try and help</p>



<a name="216799465"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/rust-num%20contribution%20guide/near/216799465" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> cuviper <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/rust-num.20contribution.20guide.html#216799465">(Nov 15 2020 at 15:56)</a>:</h4>
<p>Hi <span class="user-mention" data-user-id="249222">@Elichai Turkel</span> -- I don't have a formal guideline for rust-num, but performance work would be welcome!</p>



<a name="216799517"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/rust-num%20contribution%20guide/near/216799517" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> cuviper <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/rust-num.20contribution.20guide.html#216799517">(Nov 15 2020 at 15:57)</a>:</h4>
<p>Correctness is essential. Readability matters as far as that affects maintenance, but it's not trying to be a beginner's example or anything.</p>



<a name="216799574"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/rust-num%20contribution%20guide/near/216799574" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> cuviper <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/rust-num.20contribution.20guide.html#216799574">(Nov 15 2020 at 15:59)</a>:</h4>
<p>I wouldn't mind unsafe code if it's justified, but I don't want to get into unstable nightly features.</p>



<a name="216799623"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/rust-num%20contribution%20guide/near/216799623" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> cuviper <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/rust-num.20contribution.20guide.html#216799623">(Nov 15 2020 at 16:00)</a>:</h4>
<p>I do care about MSRV as well, but I use <code>autocfg</code> to conditionally add code for newer compilers.</p>



<a name="216799707"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/rust-num%20contribution%20guide/near/216799707" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Elichai Turkel <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/rust-num.20contribution.20guide.html#216799707">(Nov 15 2020 at 16:02)</a>:</h4>
<p><span class="user-mention silent" data-user-id="138448">cuviper</span> <a href="#narrow/stream/122651-general/topic/rust-num.20contribution.20guide/near/216799517">said</a>:</p>
<blockquote>
<p>Correctness is essential. Readability matters as far as that affects maintenance, but it's not trying to be a beginner's example or anything.</p>
</blockquote>
<p>So const generic sized Integers are off the table for now? <span aria-label="stuck out tongue wink" class="emoji emoji-1f61c" role="img" title="stuck out tongue wink">:stuck_out_tongue_wink:</span></p>



<a name="216799914"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/rust-num%20contribution%20guide/near/216799914" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> cuviper <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/rust-num.20contribution.20guide.html#216799914">(Nov 15 2020 at 16:09)</a>:</h4>
<p>No typenum-style shenanigans, if that's what you mean. <span aria-label="fear" class="emoji emoji-1f628" role="img" title="fear">:fear:</span></p>



<a name="216800049"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/rust-num%20contribution%20guide/near/216800049" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Elichai Turkel <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/rust-num.20contribution.20guide.html#216800049">(Nov 15 2020 at 16:12)</a>:</h4>
<p>oh wow, someone actually did that :O <br>
no I was joking (I do think that in general it's useful to have a Int&lt;const N: usize&gt; but only for power of 2's, not N9 or even N24)</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>